package com.annotationApplicationContext.ch04;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Slf4j
@Component
public class Student  {

    @Autowired
    private Teacher teacher;

    public Student() {
        log.debug("Student create");
    }

    @PostConstruct
    public void init(){
        log.debug("Student  init PostConstruct");
    }

    @PreDestroy
    public void detory(){
        log.debug("Student  init detory");
    }
}
